import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import nodejs from '@dfeidao/atom-mobile/msg/nodejs';
import goto from '@dfeidao/atom-mobile/nav/goto';

/**
 * 服务端调用whomi和get_params
 * @param fd
 */
export default async function whoami(fd: IFeidaoAiMobile) {
	try {
		const res = await nodejs('atom/whoami_getparams_service', {});
		return res;
	} catch (error) {
		goto(fd, 'app_login', {});// 登录页
	}
}
